<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <!-- 这段代码是移动端网页中用于开启理想视口的,理想视口开启之后,修改布局视口的宽度 -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      /* .box {
        font-size: 50px;
        color: red;
      }
      .box1 {
        font-size: 50px;
        color: green;
      } */

      * {
        margin: 0;
        padding: 0;
      }
      .box {
        width: 345px;
        height: 150px;
        margin: 15px;
        background-color: skyblue;
      }
    </style>
  </head>
  <body>
    <div class="box"></div>
    <!-- <div class="box" id="box"></div>
    <div class="box1" id="box1"></div> -->
    <script>
      //   setInterval(() => {
      //     box.innerText = '布局视口' + document.documentElement.clientWidth
      //     box1.innerText = '视觉视口' + window.innerWidth
      //   }, 50)
    </script>
  </body>
</html>
